﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace GameSchool.Models
{
	/// <summary>
	/// CourseBook er gagnaklasi sem geymir þær upplýsingar sem þarf til að skrá nýja bók á námskeið í gagnagrunninn. 
	/// </summary>  
	
	[Table("gs_course_book")]
	public class CourseBook
    {
        [Key]
		[Column("course_book_id")]
		public int CourseBookId { get; set; }

        [Column("course_id")]
        public int CourseId { get; set; }

        [ForeignKey("CourseId")]
        public virtual Course Course { get; set; }
		
        [Column("book_name")]
		[Display(Name = "Titill")]
		[Required(ErrorMessage = "Vinsamlegast settu inn titil")]
        public string BookName { get; set; }
		
        [Column("description")]
		[Display(Name = "Lýsing")]
        public string Description { get; set; }
		
        [Column("isbn")]
		[Required(ErrorMessage = "Vinsamlegast settu inn ISBN númerið")]
        public string Isbn { get; set; }

		[Column("active")]
        public bool Active { get; set; }
    }
}